#ifndef ATTENDSERVICE_H
#define ATTENDSERVICE_H

#include "baseservice.h"

class AttendService : public BaseService {
public:
    // 获取考勤列表
    QJsonArray getAttendList();
    // 添加考勤记录
    bool addOrUpdateAttendRecord(
            const QString& employeeId,
            const QString& recordDate,
            const QString& time,
            const QString& type,
            const QString& status,
            const QTime& workStart,
            const QTime& workEnd,
            const QTime& splitTime
            );

    // 根据员工ID和日期获取考勤状态
    QJsonObject getAttendStatusByEmployeeIdAndDate(const QString &employeeId, const QString &recordDate);

    // 检查员工当天是否已完成指定类型的打卡
    bool isAttendRecordExists(const QString &employeeId, const QString &recordDate, const QString &checkType);

    QJsonArray getAttendRecordsByEmployeeId(const QString& employeeId);

    // 更新请假状态
    bool updateLeaveStatus(
            const QString& employeeId,
            const QString& recordDate,
            const QString& signInStatus,
            const QString& signOutStatus
            );

};

#endif // ATTENDSERVICE_H
